<template>
	<view class="app">
		<view class="nav-wrap">
			<view class="nav-bar b-b">

				<view class="nav-item">
					<view class="tit-wrap">
						<text class="tit active">待支付</text>
						<text class="number">6</text>
					</view>
					<view class="line line--show"></view>
				</view>

				<view class="nav-item">
					<view class="tit-wrap">
						<text class="tit ">已支付</text>
						<!-- <text class="number">12</text> -->
					</view>
					<view class="line"></view>
				</view>
				<view class="nav-item">
					<view class="tit-wrap">
						<text class="tit ">已支付</text>
					</view>
					<view class="line"></view>
				</view>
				<view class="nav-item">
					<view class="tit-wrap">
						<text class="tit ">已支付</text>
						<!-- <text class="number"></text> -->
					</view>
					<view class="line"></view>
				</view>
				<view class="nav-item">
					<view class="tit-wrap">
						<text class="tit ">已支付</text>
						<!-- <text class="number"></text> -->
					</view>
					<view class="line"></view>
				</view>
			</view>
		</view>
		<view class="get10vw"></view>

		<view class="item column" v-for="(item, index) in proList" :key="index" @click="gotodetail()">
			<view class="i-header row b-b">
				<text class="time fill">2020-02-02 12:12:12</text>
				<text class="state">代付款</text>
			</view>
			<!-- 单商品 -->
			<view class="goods-wrap row">
				<view class="image-wrapper">
					<image :src="item['imglist'][0]" mode="aspectFill"></image>
				</view>
				<view class="right column">
					<text class="title clamp">{{ item.name}}</text>
					<text class="attr">{{ item.typename}}</text>
					<view class="r-b">
						<text class="price">¥{{ item.money }}</text>
						<text class="number">x1</text>
					</view>
				</view>
			</view>
			<view class="get5vw"></view>
			<view class="goods-wrap row">
				<view class="image-wrapper">
					<image :src="item['imglist'][0]" mode="aspectFill"></image>
				</view>
				<view class="right column">
					<text class="title clamp">{{ item.name}}</text>
					<text class="attr">{{ item.typename}}</text>
					<view class="r-b">
						<text class="price">¥{{ item.money }}</text>
						<text class="number">x1</text>
					</view>
				</view>
			</view>

			<view class="price-wrap">
				<text>共 2件 实付:</text>
				<text class="price">￥ 12.54</text>
			</view>
			<view class="btn-group row">
				<!-- <view class="btn center">
					<text>立即支付</text>
				</view> -->
				<!-- #ifdef MP -->
				<button type="default" open-type="contact">
					<view class="btn center round">
						<text>联系客服</text>
					</view>
				</button>
				<!-- #endif -->
				<!-- #ifdef MP -->
				<view v-if="item.status===1" class="btn center round" @click="showRefundAction(item)">
					<text>申请退款</text>
				</view>
				<!-- #endif -->
				<view class="btn center round">
					<text>自助发货</text>
				</view>
				<view class="btn center">
					<text>立即评价</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				proList: [],
			}
		},
		computed: {

		},
		watch: {

		},
		onLoad(options) {
			let that = this;
			that.proList = that.globals.proList;
			console.log('产品数据', that.proList);
		},
		onShow() {

		},
		methods: {
			gotodetail(){
				let url = '/pages/order/detailorder';
				this.navTo(url);
			},
		}
	}
</script>



<style scoped lang='scss'>
	/* #ifndef APP-NVUE */
	.nav-bar {
		view {
			display: flex;
			flex-direction: column;
		}

	}

	/* #endif */

	.fill-view {
		height: 84rpx;
		width: 100%;
	}

	.nav-bar {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: space-around;
		width: 750rpx;
		height: 84rpx;
		background-color: #fff;
		z-index: 90;
		position: fixed;
		left: 0;
		top: 0;
		/* #ifdef H5 */
		top: var(--window-top);
		/* #endif */

		&:after {
			border-color: #f7f7f7;
		}
	}

	.nav-item {
		flex: 1;
		align-items: center;
		justify-content: center;
		height: 84rpx;
		padding-top: 4rpx;
		position: relative;
	}

	.tit-wrap {
		flex: 1;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		position: relative;
	}

	.number {
		position: absolute;
		right: -20rpx;
		top: 0px;
		min-width: 36rpx;
		height: 36rpx;
		padding: 0 6rpx;
		text-align: center;
		line-height: 28rpx;
		border: 4rpx solid #fff;
		background-color: $base-color;
		border-radius: 100rpx;
		font-size: 20rpx;
		color: #fff;
	}

	.tit {
		font-size: 30rpx;
		color: #333;
	}

	.active {
		color: #ff4443;
		font-weight: 700;
	}

	.line {
		width: 34rpx;
		height: 4rpx;
		border-radius: 100rpx;
		background-color: #ff4443;
		opacity: 0;

		&--show {
			opacity: 1;
		}
	}
</style>


<style>
	page {
		background-color: #f7f7f7;
	}
</style>
<style scoped lang="scss">
	.app {}

	.item {
		width: 710rpx;
		padding-bottom: 24rpx;
		margin-top: 20rpx;
		margin-left: 20rpx;
		background-color: #fff;
		border-radius: 12rpx;
	}

	.b-b:after {
		left: 4rpx;
		right: 4rpx;
		border-color: #e5e5e5;
	}

	.i-header {
		height: 80rpx;
		padding: 0 24rpx;
		margin-bottom: 24rpx;

		.time {
			font-size: 26rpx;
			color: #999;
		}

		.state {
			font-size: 30rpx;
			color: $base-color;

			&.gray {
				color: #999;
			}
		}
	}

	.scroll-view {
		width: 100%;
		height: 150rpx;

		.goods-list {
			display: flex;

			&::before,
			&::after {
				content: '';
				width: 20rpx;
				height: 130rpx;
				flex-shrink: 0;
			}

			&::after {
				width: 10rpx;
			}

			.image-wrapper {
				flex-shrink: 0;
				width: 130rpx;
				height: 130rpx;
				margin-right: 16rpx;
				border-radius: 4rpx;
				overflow: hidden;
			}

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.goods-wrap {
		padding: 0 20rpx;

		.image-wrapper {
			width: 130rpx;
			height: 130rpx;
			border-radius: 4rpx;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.right {
			flex: 1;
			padding-left: 20rpx;
			overflow: hidden;
		}

		.title {
			font-size: 28rpx;
			color: #333;
		}

		.attr {
			margin: 16rpx 0 20rpx;
			min-height: 30rpx;
			font-size: 24rpx;
			color: #999;
		}

		.r-b {
			display: flex;
			height: 30rpx;
		}

		.price {
			font-size: 28rpx;
			color: #333;
			font-weight: normal;
		}

		.number {
			margin-left: 16rpx;
			font-size: 26rpx;
			color: #999;
		}
	}

	.price-wrap {
		display: flex;
		justify-content: flex-end;
		padding: 16rpx 24rpx 30rpx;
		font-size: 26rpx;
		color: #333;

		.price {
			font-size: 30rpx;
			font-weight: 700;
		}
	}

	.btn-group {
		justify-content: flex-end;
		padding-right: 16rpx;

		.btn {
			width: 150rpx;
			height: 60rpx;
			margin-left: 20rpx;
			font-size: 24rpx;
			color: #fff;
			background-color: $base-color;
			border-radius: 100rpx;
		}

		.round {
			background-color: #fff;
			color: #333;
		}
	}
</style>
